package com.hp.springioc01;

public class TestComputer {

    public static void main(String[] args) {
        //硬编码方式
        CPU cpu = new IntelCPU();
        Memory memory = new SumsungMemory();
        Computer computer = new Computer();
        computer.setBrand("华为");
        computer.setCpu(cpu);
        computer.setSumsungMemory(memory);
        computer.start();
    }
}
